// packageG/mycomponent/courseItem/courseItem.js
Component({
  /**
   * 组件的属性列表
   */
  options: {
    addGlobalClass: true,
    multipleSlots: true, // 复数插槽: 是
  },
  properties: {
    datas:{
      type:Object,
      value:{}
    },
    courseType:{
      type:Number
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    lecturerTextNav(event) {
      let {goods_id,id} = event.currentTarget.dataset;
      if(this.data.courseType === 1) {
        wx.navigateTo({
          url: `/packageA/detail_v2/detail_v2?id=${goods_id}`,
        })
      } else if(this.data.courseType === 2) {
        wx.navigateTo({
          url: `/packageA/detail_v2/detail_v2?id=${id}`,
        })
      } else {
        wx.navigateTo({
          url: `/packageA/detail_v2/detail_v2?id=${goods_id}`,
        })
      }
    }
  }
})
